package com.thwcompany.controller;
import com.thwcompany.dao.IPersonalDao;
import com.thwcompany.pojo.Personal;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@Slf4j
@Controller
@SuppressWarnings("all")
public class ConsumerHystrixController {

    @Autowired
    IPersonalDao iPersonalDao;

    @GetMapping(path = "/consumer/{id}")
    @ResponseBody
    public Personal consumerGet(@PathVariable("id") int id) throws Exception {
        log.info("====consumerGet=======");
        Personal personal = iPersonalDao.getPersonal(id);
        return personal;

    }






}
